<!--#include file="inc/const.asp"-->
<%
dim url: url = request.querystring : url=replace(url,"'","")
if Len(url) > 0 and instr(url,",") = 0 and isnumeric(url) then
	dim rs
	Set rs = db("Select Top 1 [id],[Cid],[Diyname],[Createtime],[Viewpath] From [{pre}Content] Where [Display]=1 and [id]=" & url ,1)
	if rs.Eof then
		url = "index.asp"
	else
		url = buildviewpath(rs("id"),rs("Cid"),rs("Diyname"),rs("Createtime"),rs("Viewpath"))
	end if
	if right(url,3) = "///" then url = left(url,len(url)-3)
	rs.Close: Set rs = Nothing
	conn.close: set conn = nothing
end if 
if Len(url) = 0 then url = "index.asp"
if createhtml = 2 then url = rewriterule(url)
response.Redirect url
%>
